﻿using Avalonia.Controls;
using LiftHub.Data.LedgerModels;

namespace LiftHub.Controls;

public partial class AddCategoryControl : UserControl
{
    public AddCategoryControl()
    {
        InitializeComponent();
    }

    public CategoryModel? Done()
    {
        if (string.IsNullOrEmpty(CategoryName.Text)) return null;
        return new CategoryModel()
        {
            CategoryName = CategoryName.Text,Explanation = Explanation.Text
        };
    }
}